﻿<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [
  <!ENTITY copy "&#169;">
  <!ENTITY nbsp "&#160;">
  <!ENTITY laquo "&#171;">
  <!ENTITY raquo "&#187;">
]>
<xsl:stylesheet xmlns="http://www.w3.org/1999/xhtml"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version="1.0">


  <xsl:include href="../layout.xsl"/>

  <xsl:template match="/">
    <xsl:apply-templates />
  </xsl:template>

  <xsl:template match="content">

   

 <div class="content">
      <article> <xsl:call-template name="Path"/>
        <h1>
          <xsl:value-of select="$Static/title"/>
        </h1>

        <xsl:value-of select="$Static/text" disable-output-escaping="yes"/>

        <div class="body-search">
          <SCRIPT TYPE="text/javascript">
            function submitenter2(myfield,e)
            {
            var keycode;
            if (window.event) keycode = window.event.keyCode;
            else if (e) keycode = e.which;
            else return true;

            if (keycode == 13)
            {
            $('#form_search2').submit();
            return false;
            }
            else
            return true;
            }
          </SCRIPT>
          <form action="/poisk" method="get" id="form_search2">
            <input name="s" type="text" value="{$Main/@s}" placeholder="поиск по сайту" onKeyPress="return submitenter2(this,event)"/>
            <input type="submit" value="Искать"/>
          </form>
        </div>


        <xsl:if test="not($Main/list/data/row)">
          По вашему запросу ничего не найдено.
        </xsl:if>

        <xsl:if test="$Main/list/data/row">
          <div class="text-top">
            По вашему запросу
            <xsl:if test="$Main/@s != ''">
              «<b>
                <xsl:value-of select="$Main/@s"/>
              </b>»
            </xsl:if> найдено <xsl:value-of select="count($Main/list/data/row)"/>
          </div>

          <ul class="categories">
            <xsl:for-each select="$Main/list/data/row">
              <li>

                <a href="{url}/{idt}" class="avatar">
                  <img src="{$Files}{path}{id}avatar{file_name}"  width="100%" alt="{title}" title="{title}"/>
                </a>

                <p class="title">
                  <a href="{url}/{idt}" >
                    <xsl:value-of select="title"/>
                  </a>
                </p>
               <!-- <p class="sub-title">
                  <i>
                   <xsl:value-of select="subtitle"/>

                  </i>

                </p>-->
                <p>

                  <xsl:value-of select="desc"/>

                </p>
                <p>

                  <a href="{url}/{idt}" class="more2">

                    <xsl:choose>
                      <xsl:when test="$Lang = 'ua'">
                        Детальніше про полупричеп
                      </xsl:when>
                      <xsl:when test="$Lang = 'ru'">
                        Подробнее о полуприцепе
                      </xsl:when>
                    </xsl:choose>


                  </a>

                </p>
              </li>
            </xsl:for-each>
          </ul>
        </xsl:if>


      </article></div>
     
  </xsl:template>

</xsl:stylesheet>